<?php

use app\common\lib\Redis;
use \think\Db;

class PictureHelper
{
    public static function getPictures($pic_code, $array=true){
        if (empty($pic_code)){
            return [];
        }
        $pictures = Db::name('pictures')
            ->where('pic_code',$pic_code)
            ->select();
        if ($array){
            return $pictures;
        }else{
            return $pictures[0];
        }
    }

}